//
//  QDSettingLogoutFooterView.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/2/22.
//  Copyright © 2019 YueWen. All rights reserved.
//

import UIKit

/// 登出的footer
final class QDSettingLogoutFooterView: UIView {

    /// 登出按钮
    let logoutButton = UIButton()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        logoutButton.adjustsImageWhenHighlighted = false
        logoutButton.setTitle("退出", for: .normal)
        logoutButton.setTitleColor(QDColors.theme, for: .normal)
        logoutButton.titleLabel?.textAlignment = .center
        logoutButton.titleLabel?.font = Font.regular.font(size: 16)
        
        //border
        logoutButton.layer.cornerRadius = 24
        logoutButton.clipsToBounds = true
        logoutButton.layer.borderColor = #colorLiteral(red: 0.4509803922, green: 0.8705882353, blue: 0.5215686275, alpha: 1)
        logoutButton.layer.borderWidth = 0.5
        
        addSubview(logoutButton)
        
        logoutButton.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(20)
            make.right.equalToSuperview().inset(20).priority(.high)
            make.height.equalTo(48)
            make.top.equalToSuperview().offset(40)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
